/**
 * 统计报表
 * @auth 鲲鹏
 * @date 2020-05-04
 */


/**
 * 数据统计
 */
function statistics6(pa_list,co_list,tr_list,pr_list,date,max,interval) 
{
    var themeName = "";//"macarons";
    var myChart = echarts.init(document.getElementById('statistics6'),themeName),
        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    crossStyle: {
                        color: '#999'
                    }
                }
            },
            toolbox: {
                feature: {
                    dataView: {show: false, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            legend: {
                data: ['专利', '商标', '项目','著作权']
            },
            xAxis: [
                {
                    type: 'category',
                    data: date,
                    axisPointer: {
                        type: 'shadow'
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '数量',
                    min: 0,
                    max: max,
                    interval: interval,
                    axisLabel: {
                        formatter: '{value} 件'
                    }
                }
            ],
            series: [
                {
                    name: '专利',
                    type: 'bar',
                    data: pa_list
                },
                {
                    name: '商标',
                    type: 'bar',
                    data: tr_list
                },
                {
                    name: '项目',
                    type: 'bar',
                    data: pr_list
                },
                {
                    name: '著作权',
                    type: 'bar',
                    data: co_list
                }
            ]
        };

    myChart.setOption(option);

    window.onresize = function() {
        myChart.resize();
    };
}



